// 搜索建议
const Http = require('../../util/request');

module.exports = (query, request) => {
    const type = {
        0: 'pc',
        1: 'android',
        2: 'iphone',
        3: 'ipad'
    }[query.query.type || 0] || 'pc';
    Http(
        'POST', `https://music.163.com/api/v2/banner/get`, {clientType: type},
        {crypto: 'weapi', cookie: query.query.cookies, proxy: query.proxy}
    ).then(res => {
        request.json(res)
    }).catch( err => {
        request.json(err)
    })
};
